import QtQuick 2.0
import QtQuick.Particles 2.0

//粒子画笔
Rectangle {
    id: root;

    color: "black";

    //粒子系统
    ParticleSystem {
        id: particle;
    }

    //粒子发射器
    Emitter {
        id: emitter;
        anchors.fill: parent;
        anchors.margins: 50;
        system: particle;
        emitRate: 5;
        lifeSpan: 3000;
        lifeSpanVariation: 500;
        size: 16;
        endSize: 32;
    }

    ItemParticle {
        system: particle;
        delegate: itemDelegate;
    }

    Component {
        id: itemDelegate;

        Item {
            id: containter;
            width: 32*Math.ceil(Math.random()*3);
            height: width;

            Image{
                anchors.fill: parent;
                anchors.margins: 4;
                source: "Images/png/star.png";
            }
        }
    }
}
